<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j" template="/layout/template.xhtml">

	<ui:define name="body">

		<h:form id="courseAddStudent">

			<rich:panel>

				<h:panelGrid columns="1" width="%100">
					<s:decorate id="MilestoneName" template="/layout/display.xhtml">
						<ui:define name="label">#{messages.milstoneName}</ui:define>
						<h:outputText value="#{activityHome.instance.name}"
							required="true" />
					</s:decorate>
					<s:decorate id="description" template="/layout/display.xhtml">
						<ui:define name="label">#{messages['txt.activityDetails']}</ui:define>
						<h:outputText value="#{activityHome.instance.desciption}"
							style="width: 500px" required="true" />
					</s:decorate>

					<s:decorate id="dueDate" template="/layout/display.xhtml">
						<ui:define name="label">#{messages.dueDate}</ui:define>
						<h:outputText value="#{activityHome.instance.dueDate}">
							<s:convertDateTime type="date" dateStyle="short"
								pattern="dd/MM/yyyy" />
						</h:outputText>
					</s:decorate>
					<s:decorate id="submissionField" template="/layout/display.xhtml">
						<ui:define name="label">#{messages['txt.CourseName']}</ui:define>
						<h:outputText
							value="#{activityHome.instance.schedule.course.name}" />
					</s:decorate>
				</h:panelGrid>
				<h:panelGrid columns="1" width="%100">
					<a:outputPanel id="req">

						<s:decorate id="announcementField2" template="/layout/edit.xhtml"
							rendered="#{lectureNoteHome.instance.fileName==null}">
							<ui:define name="label">#{messages['txt.fileToBeUploaded']}</ui:define>
							<rich:fileUpload fileUploadListener="#{activityHome.listener}"
								maxFilesQuantity="1" id="upload" immediateUpload="true"
								allowFlash="false" autoclear="false" ajaxSingle="false"
								listHeight="55" required="true">
								<a:support event="onuploadcomplete" reRender="req"
									ajaxSingle="false" />
							</rich:fileUpload>
						</s:decorate>
					</a:outputPanel>

				</h:panelGrid>
			</rich:panel>


			<div class="actionButtons">
			
				<h:commandButton id="update" value="Save"
					action="#{activityHome.upload}"
					rendered="#{activityHome.managed}">
				</h:commandButton>
				<s:button id="cancel" value="#{messages.Cancel}"
					view="/Course/viewSchedule.xhtml">
				</s:button>
			</div>

		</h:form>

	</ui:define>

</ui:composition>
